package yxy.game.pm2.module;

import java.util.ArrayList;
import java.util.Collection;

import yxy.game.pm2.bean.Hero;
import yxy.game.pm2.message.HeroMessage;
import yxy.game.pm2.module.hero.HeroHandle;

public class AltarHandle {

	/** 获得可以献祭的武将 */
	public Collection<HeroMessage.HeroSimple> altarHeros(String playerCode) {
		HeroHandle heroHandle = new HeroHandle();
		ArrayList<HeroMessage.HeroSimple> list = new ArrayList<>();
		for (Hero hero : heroHandle.getFreeHeros(playerCode).values()) {
			try {
				list.add(heroHandle.getHeroSimple(playerCode, hero));
			} catch (Exception e) {
				e.printStackTrace();
			}
		}
		return list;
	}

}
